package cn.trasen.his.poc.std.api.model.drug;

import cn.trasen.his.poc.std.api.model.major.OrgInfo;
import pro.shushi.pamirs.boot.base.ux.annotation.field.UxWidget;
import pro.shushi.pamirs.boot.base.ux.annotation.view.UxTableSearch;
import pro.shushi.pamirs.meta.annotation.Field;
import pro.shushi.pamirs.meta.annotation.Model;
import pro.shushi.pamirs.meta.base.IdModel;

/**
 * @Description: 药品用法字典
 * @author: Jacob
 * @Date: 2024-11-26 18:47:02
 * @Company: 湖南创星科技股份有限公司
 */
@Model.model(DrugUsage.MODEL_MODEL)
@Model(displayName = "药品用法字典", labelFields = "name")
public class DrugUsage extends IdModel {

    public static final String MODEL_MODEL = "ts.his.DrugUsage";

    @Field.many2one
    @Field.Relation(relationFields = {"orgCode"}, referenceFields = {"code"})
    @Field(displayName = "机构", required = true)
    private OrgInfo org;

    @Field.String
    @Field(displayName = "机构代码", invisible = true)
    private String orgCode;

    @UxTableSearch.FieldWidget(@UxWidget())
    @Field.String
    @Field(displayName = "用法编码", required = true)
    private String code;

    @UxTableSearch.FieldWidget(@UxWidget())
    @Field.String
    @Field(displayName = "用法名称", required = true)
    private String name;

    @Field.String
    @Field(displayName = "应用范围", required = true)
    private String range;
}